Skip to content

feat: Add multi-message email system with local testing support#2

Open
Santiago-Balcero wants to merge 2 commits intoColombiaPython:mainfrom
Santiago-Balcero:main
Open

feat: Add multi-message email system with local testing support#2
Santiago-Balcero wants to merge 2 commits intoColombiaPython:mainfrom
Santiago-Balcero:main

Conversation

@Santiago-Balcero
Copy link

feat: Add multi-message email system with local testing support

🚀 What's Changed

This PR transforms the simple email script into a comprehensive multi-message email automation system for Django Girls Colombia workshops.

✨ Major Features Added

🎯 Multi-Message Support

  • Support for 5 different email types:
    • certificate - Post-workshop certificates for attendees
    • accepted-participants - Acceptance notifications for participants
    • waitlist-participants - Waitlist notifications for participants
    • accepted-mentors - Acceptance notifications for mentors/guides
    • waitlist-mentors - Waitlist notifications for mentors

🧪 Local Testing Mode

  • New --local flag generates HTML preview files instead of sending emails
  • Perfect for testing templates and data before sending actual emails
  • Preview files saved to output/ directory with descriptive names

📧 Professional Email Templates

  • Complete set of responsive HTML email templates
  • Consistent branding and styling across all message types
  • Proper template variable system that safely handles CSS/JS braces

⚙️ Better Code Organization

  • Proper argument parsing with argparse
  • Organized configuration constants
  • Separate functions for different email workflows
  • Improved error handling and CSV validation
  • Better template loading with safe variable replacement

🗂️ File Structure Improvements

  • Moved data files to data/ directory
  • Added comprehensive email templates in templates/
  • Updated .gitignore to exclude output files
  • Completely rewritten README with detailed usage instructions

🔧 Usage Examples

# Test certificate emails locally
python main.py --type certificate --local

# Send acceptance emails to mentors
python main.py --type accepted-mentors

# Test participant waitlist notifications
python main.py --type waitlist-participants --local

🛠️ Technical Changes

  • Breaking Change: Command-line interface now requires --type parameter
  • Template variables properly contextualized per message type
  • Dynamic CSV file selection based on email type
  • Improved Gmail API integration with better error handling
  • Workshop dates updated to 2026

This upgrade provides a robust, testable, and maintainable email automation system that scales with Django Girls Colombia's workshop management needs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant